package com.sskj.mine.asset;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.account.data.AccountBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.presenter.BasePresenter;
import com.sskj.mine.asset.TransferRecordsActivity;

import java.util.List;


/**
 * @author Hey
 * Create at  2019/05/03
 */
class TransferRecordsPresenter extends BasePresenter<TransferRecordsActivity> {


    /**
     * 转账流水记录
     *
     * @return
     */
    public void transferRecord(){
          httpService.transferRecord().execute(new JsonCallBack<HttpData<PageBean<AccountBean>>>() {
            @Override
            public void onSuccess(Response<HttpData<PageBean<AccountBean>>> response) {
                HttpData<PageBean<AccountBean>> httpData = response.body();
                if (httpData.getStatus() == HttpConfig.OK) {

                    mView.updateUI(httpData.getData().getList());
                }
            }
        });
    }


}
